D_XILINX_LIBMSLOG_LIBS :=`pkg-config --libs libmslog_xilinx`
D_XILINX_LIBMSLOG_INCLUDES :=`pkg-config --cflags libmslog_xilinx`
D_XILINX_LIBMSCOMMON_LIBS :=`pkg-config --libs libmscommon_xilinx`
D_XILINX_LIBMSCOMMON_INCLUDES :=`pkg-config --cflags libmscommon_xilinx`
C_XILINX_INCLUDE=${D_BASEAPI_FLAGS} -Isrc -Isrc/audio_input -Isrc/audio_output ${D_XILINX_LIBMSLOG_INCLUDES} ${D_XILINX_LIBMSCOMMON_INCLUDES} -DOS_PLATFORM_XILINX
C_XILINX_LIBS=${D_XILINX_LIBMSLOG_LIBS} ${D_XILINX_LIBMSCOMMON_LIBS} 
libmstool_xilinx_PATH=/home/sugao/lin
libmstool_xilinx_CC=${libmstool_xilinx_PATH}/bin/arm-xilinx-linux-gnueabi-gcc
libmstool_xilinx_SRC=${C_SRC}
libmstool_xilinx_CFLAGS=${C_XILINX_INCLUDE} ${C_XILINX_LIBS} ${CFLAGS_SHARE} 

xilinx:libmstool_xilinx install_xilinx

libmstool_xilinx: 
	mkdir -p $(OUT_LIB)
	mkdir -p $(OUT_INCLUDE)
	cp -fr src/*.h $(OUT_INCLUDE)
	$($@_CC)  $($@_SRC)  $($@_CFLAGS)  -o $(OUT_LIB)/$(PROGRAM_NAME).so 
	
install_xilinx: 
	mkdir -p  ${prefix_xilinx}/lib/ 
	mkdir -p  ${prefix_xilinx}/include/   
	mkdir -p  ${prefix_xilinx}/lib/pkgconfig/ 
	cp -fr $(OUT_LIB)/$(PROGRAM_NAME).so		${prefix_xilinx}/lib/     
	cp -fr $(OUT_INCLUDE)				${prefix_xilinx}/include/	     
	cp -fr platform/$(PROGRAM_NAME)_xilinx.pc	${prefix_xilinx}/lib/pkgconfig/
	
uninstall_xilinx:
	rm -fr ${prefix_xilinx}/lib/$(PROGRAM_NAME).so 
	rm -fr ${prefix_xilinx}/include/$(PROGRAM_NAME)
	rm -fr ${prefix_xilinx}/lib/pkgconfig/$(PROGRAM_NAME)_xilinx.pc	
